import { inject, InjectionKey, Ref, ShallowRef } from "vue";
import BpmnModeler from "bpmn-js/lib/Modeler";

export const menuOptionsKey = Symbol("menuOptions") as InjectionKey<Ref<MenuView[]>>

export const userInfoKey = Symbol("userInfo") as InjectionKey<Ref<UserInfo>>

export const userMapKey = Symbol('userMapKey') as InjectionKey<Map<string, UserView>>

export const permissionKey = Symbol("permission") as InjectionKey<Ref<Set<string>>>
export const bpmnSelectedElemKey = Symbol("bpmnSelectedElem") as InjectionKey<ShallowRef<any>>
export const bpmnModelerKey = Symbol("bpmnModeler") as InjectionKey<ShallowRef<BpmnModeler | undefined>>
export const updatePropertyKey = Symbol("updatePropertyKey") as InjectionKey<Function>
export const propertyPanelOpenedKey = Symbol("propertyPanelOpenedKey") as InjectionKey<Ref<string>>
export const workflowVerKey = Symbol("workflowVerKey") as InjectionKey<Ref<WorkflowTypeVerView | undefined>>
export const modelingFieldKey = Symbol("processModelFieldKey") as InjectionKey<ShallowRef<ModelingFieldDefView[]>>
export const modelingPageKey = Symbol("modelingPageKey") as InjectionKey<ShallowRef<ModelingPageView[]>>
export const processInstanceDetailInfoKey = Symbol("processInstanceDetailInfoKey") as InjectionKey<Ref<ProcessInstanceInfoView>>
export const processNodePageListKey = Symbol("processNodePageListKey") as InjectionKey<ShallowRef<ProcessModelNodePageView[]>>

export const actReModelKey = Symbol("actReModel") as InjectionKey<Ref<ActReModel | undefined>>

export const queryParamKey = "queryParamKey"
export const queryListResultKey = "queryListResultKey"
export const executeQueryKey = "executeQueryKey"
export const totalKey="totalKey"
export const loadingKey="loadingKey"
export const resetFormKey="resetFormKey"
export const resetQueryFormKey="resetQueryFormKey"
export const showDialogKey="showDialogKey"
export const showSearchKey="showSearchKey"
export const validateFormKey="validateFormKey"
export const tableRowSelectChangeKey="tablerowSelectChangeKey"
export const tabDesignColumnSelectChangeKey="tabDesignColumnSelectChangeKey"
export const resetKey="resetKey"
export const setValueKey="setValueKey"
export const insertOrUpdateFlagKey="insertOrUpdateFlagKey"
// 清空选中
export const clearSelectKey="clearSelectKey"
//设置行数据，用于表格嵌套组件，比如按钮等
export const setRowDataKey="setRowDataKey"
//注册信息
export const registerInfoKey="registerInfoKey"
